package com.hcjy.common;

import lombok.Data;

/**
 * @author Guqier
 * @version 1.0
 * @date 2025/6/6 19:16
 */
@Data
public class AppProperties {

    /**
     * 权限相关配置
     */
    public static class Auth {
        /**
         * Session用户信息Key
         */
        public static final String SESSION_USER_INFO_KEY = "user_info";
    }

    /**
     * 缓存相关配置
     */
    public enum Cache {

        VERIFY_CODE_ID("verify_code:id:"), // 验证码前缀
        VERIFY_CODE_PHONE("verify_code:phone:"), // 验证码前缀
        ;

        public final String prefix;

        Cache(String s) {
            this.prefix = s;
        }

        /**
         * 获取拼装后的key
         * @param id id
         * @return 拼装后的key
         */
        public String getKey(String id) {
            return this.prefix + id;
        }
    }

}
